package zouran.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import zouran.entity.EarthquakeInfo;

import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Author：zouran
 * Date：2023/3/31  10:23
 * Description:
 */
public interface EarthquakeInfoMapper extends BaseMapper<EarthquakeInfo> {
    EarthquakeInfo getEarthquakeInfoById(long id);

    List<EarthquakeInfo> getAllEarthquakeInfo(Map<String, Object> parameter);

    List<EarthquakeInfo> getEarthquakeInfoByPosition(Double lon, Double lat);

    List<HashMap<String, Object>> getAllEarthquakePositionInfo(Map<String, Object> parameter);

    List<EarthquakeInfo> getSeismicZonesEarthquakeInfo(Double east, Double south, Double west, Double north);

    List<HashMap<String, Object>> getSeismicZonesEarthquakePositionInfo(Double east, Double south, Double west, Double north);

    List<EarthquakeInfo> getHistoryEarthquakeInfoList(String name);

    int judgeEarthquakeInfoExist(String name, LocalDateTime time);

    int judgeEarthquakeInfoExistById(long id);

    HashMap<String, Object> getEarthquakeIdRange();

    List<Double> getEarthquakeStatisticByyear(String yearStart, String yearEnd);
}
